异形按钮的实现方法(例如:斜角按钮,星形按钮)
群里 撒旦微笑 提供了纯色背景和按钮方案, 利用楼上所说的边框.
import win.ui; /*DSG{{*/ var winform = win.form(text="aardio form";right=759;bottom=469;bgcolor=13195370) winform.add( custom={cls="custom";text="自定义控件";left=0;top=64;right=760;bottom=470;bgcolor=16777215;z=4}; edit={cls="pl异形按钮的实现方法(例如:斜角按钮,星形按钮)
回复#3 @dsp2138 :
高出来说明原来的图像区域就是那么高, 矮的只是上半部分是透明的, 你按照这个思路去试试
记录下自己零基础学习htmlayout的过程
16 ,列表视图控件Grid
类似winform的listview控件
<html> <head> <style> table[name="reportview"] { width:500px; /* natural width */ height:100%%; overflow:auto; behavior:grid; background: url(theme:edit-normal) stretch; padding:1px; f记录下自己零基础学习htmlayout的过程
15, 树形视图 tree
类似winform里面的treeView控件
<widget type="tree" #demo treelines style="height:100%%;width:100%%;font-size:20px"> <option expanded>Metals <option expanded>Alkaline Metals <option>Lithium <coecharts三维图,散点
回复#2 @evyhui :
这个用的web.form , 用的ie11
用webkit和blink推荐用 http://www.chengxu.xyz/t/214 这个帖子里面的js控件
记录下自己零基础学习htmlayout的过程
14, 跟踪条
类似winform里的trackbar
htmlayout里分水平和垂直跟踪条 , 类型分别是
hslider 水平跟踪条
vslider 垂直跟踪条
<input type="hslider" name="demo1" min="0" max="100" value="0" step="10" buddy="demo1-buddy"/>水平当前值: <b id="demo1-buddy">x<记录下自己零基础学习htmlayout的过程
13, 进度条
和winform一样的功能progress控件
最简单的进度条:
<p> 0%:<progress name="p1" maxvalue="100" value="0"/> 25%:<progress name="p2" maxvalue="100" value="25"/> 50%:<progress name="p3" maxvalue="100" value="50"/> 75%:<记录下自己零基础学习htmlayout的过程
12, 数值输入框
类似winform的spin控件, 输入框的右侧有上下微调按钮,点击可以自加数值
<input type="number" />type="number"只允许输入
记录下自己零基础学习htmlayout的过程
11, 文本框
类似winform的editbox控件
<input type="text" />上面是最简单的输入框
text有下面这些属性可以设置,达到不同的效果
记录下自己零基础学习htmlayout的过程
10, 多选框
记录下自己零基础学习htmlayout的过程
9 , 单选按钮
类似winform 的radio按钮功能, 在htmlayout中使用很简单
<INPUT type="radio" name="color" value="blue">蓝色 <INPUT type="radio" name="color" value="red" checked>红色 <INPUT type="radio" name="color" value="green">绿色 <INPUT type记录下自己零基础学习htmlayout的过程
8, 文件选择器 和文件夹选择器
类似aardio里winform里面的fsys.dlg.openxxx , 弹出一个窗口让你选择要上传的文件或文件夹功能
文件选择器:<input type="file-path" filter="HTML files:*.htm,*.html;Text files:*.txt;All files:*.*" novalue="(select file)" value="" /> <br/> 文件夹选择:<inp记录下自己零基础学习htmlayout的过程
7, ICON图标的显示
这个是内置的behavior:shell-icon实现的, 不需要import任何库,编写html即可.
<select size="6" style="height:500px"> <option><img style="behavior: shell-icon;" filename=".png" /> *.png icon</option> <option><img记录下自己零基础学习htmlayout的过程
那么,右键菜单应该怎么做呢? 点击右键才能出现的菜单
看了htmlayout的示例,
selector函数的参数是指定右键菜单的CSS选择器
<div style="context-menu:selector(menu#context);">这里要点右键才出现菜单</div> <menu.context #context> <li id="i1">First item</li> <记录下自己零基础学习htmlayout的过程
菜单显示完成了, 那么怎么才能知道我点击了哪个呢?
和上面的button写法一样, 只需要把每个<li>加个id就可以了
记录下自己零基础学习htmlayout的过程
4, 多级菜单